package com.raos.pagehelper.web;

import com.github.pagehelper.PageInfo;
import com.raos.pagehelper.model.SysUser;
import com.raos.pagehelper.service.SysUserService;
import com.raos.pagehelper.utils.PageQuery;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * 用户控制器
 *
 * @author raos
 * @emil 991207823@qq.com
 * @date 2021/09/04 22:31
 */
@RestController
public class UserController {

    @Autowired
    private SysUserService userService;

    @GetMapping("/getUserPage")
    public PageInfo<SysUser> queryListByPage(@RequestParam Map<String, Object> params) {
        return userService.queryListByPage(params, new PageQuery(1,5));
    }

}
